const process = require('process')
// console.log(process.versions);
// console.log(process.platform);
// console.log(process.config);
// console.log(process.pid);
// console.log(process.title);
process.stdin.resume()
process.stdin.on('data', drunk => {
  // console.log('读取到的数据: ', drunk);
})

process.argv.forEach((item, index, arry) => {
  // console.log(index + ' ; ' + item);
})

// nextTick
// function getFoo() {
//   console.log('foo');
// }
// process.nextTick(getFoo)
// console.log('bar');

// setTimeout(getFoo, 0)
// console.log('bar');
console.log(process.memoryUsage());
console.log('当前目录: ' + process.cwd());
console.log(process.chdir('../'));
console.log('上层目录: ' + process.cwd());

// console.log(process.getgid());